/*
 * testerHeapSort.cpp
 *
 *  Created on: Sep 19, 2011
 *      Author: dgdiniz
 */

#include <iostream>
#include <stdio.h>
#include "sort/heapSort.hpp"

using namespace std;
using namespace playlib;

void    RunTestsHeapSort()
{
	int listToSortInt[10] = {2,1,7,3,0,4,6,9,8,5};
	string listToSortString[10] = {"Douglas", "Gisele", "casa", "maria", "amor", "moly", "Dream", "Loja", "carinho", "tudo"};

	cout << "Before Heap Sort:  ";
	for (int i=0; i<10; i++)
		cout << " | " << listToSortInt[i];

	cout << endl;

	heapSort(&listToSortInt[0], 10);

	cout << "After Heap Sort:  ";
	for (int i=0; i<10; i++)
		cout << " | " << listToSortInt[i];

	cout << endl;



	cout << "\n\n\nBefore Heap Sort:  ";
	for (int i=0; i<10; i++)
		cout << " | " << listToSortString[i];

	cout << endl;

	heapSort(&listToSortString[0], 10);

	cout << "After Heap Sort:  ";
	for (int i=0; i<10; i++)
		cout << " | " << listToSortString[i];

	cout << endl;



//	cout << "\n\n\nBefore Heap Sort Dec:  ";
//	for (int i=0; i<10; i++)
//		cout << " | " << listToSortInt[i];
//
//	cout << endl;
//
//	heapSortDec(&listToSortInt[0], 10);
//
//	cout << "After Heap Sort Dec:  ";
//	for (int i=0; i<10; i++)
//		cout << " | " << listToSortInt[i];
//
//	cout << endl;


}

void testerHeapSort()
{
	cout << "\n\n\n\nTESTER-HEAP-SORT ---  Testing Heap Sort\n";
	RunTestsHeapSort();
	cout << "TESTER-HEAP-SORT ---  FINISHED!\n\n\n\n";
}
